package com.dcits.electronic_account.mapper;

import com.dcits.electronic_account.bean.VirtualBank;
import com.dcits.electronic_account.dto.BindingBankDTO;
import com.dcits.electronic_account.dto.CancelBindingDTO;
import com.dcits.electronic_account.vo.BindingRelationsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VirtualBankMapper {

    //插入绑定关系
    void insertVirtualBank(@Param("bankCardNumber") String bankCardNumber,@Param("userId") Integer userId);

    //根据银行卡号查询绑定关系
    VirtualBank selectVirtualBankByBankNumberAndUserId(BindingBankDTO bindingBankDTO);

    /**
     * 删除绑定关系
     * @param cancelBindingDTO
     * @return
     */
    Integer delVirtualBankRelation(CancelBindingDTO cancelBindingDTO);

    List<BindingRelationsVO> selectRelations(@Param("userId") Integer userId);
}
